-- GENERATED SPELL FOR [Anub'ar Shadowcaster] --


function spell0_28733(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(52534,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28733', 2000, 1)
end

function spell1_28733(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(59357,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28733', 2000, 1)
end

function spell2_28733(pUnit, Event) --@Shadow Nova,Self--
pUnit:FullCastSpellOnTarget(52535,pUnit)
pUnit:RegisterEvent('Sorts_28733', 570, 1)
end

function spell3_28733(pUnit, Event) --@Shadow Nova,Self--
pUnit:FullCastSpellOnTarget(59358,pUnit)
pUnit:RegisterEvent('Sorts_28733', 694, 1)
end

function Sorts_28733(pUnit, Event)
local choix_sorts_28733 = math.random(0, 3)
if choix_sorts_28733 == 0 then
pUnit:RegisterEvent('spell0_28733', 1, 1)
end
if choix_sorts_28733 == 1 then
pUnit:RegisterEvent('spell1_28733', 1, 1)
end
if choix_sorts_28733 == 2 then
pUnit:RegisterEvent('spell2_28733', 1, 1)
end
if choix_sorts_28733 == 3 then
pUnit:RegisterEvent('spell3_28733', 1, 1)
end
end

function mob28733_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28733', math.random(1500, 3000), 1)
end

function mob28733_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28733_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28733_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28733, 1, 'mob28733_Action')
RegisterUnitEvent(28733, 2, 'mob28733_Leave')
RegisterUnitEvent(28733, 3, 'mob28733_Kill')
RegisterUnitEvent(28733, 4, 'mob28733_Die')
